<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>面试报告</title>
    <style>
        body { font-family: Arial, sans-serif; margin: 40px; }
        .container { max-width: 800px; margin: auto; }
        .header { text-align: center; border-bottom: 2px solid #333; padding-bottom: 20px; }
        .section { margin-top: 20px; }
        .section h2 { color: #2c3e50; }
        .table { width: 100%; border-collapse: collapse; margin-top: 10px; }
        .table th, .table td { border: 1px solid #ddd; padding: 8px; text-align: left; }
        .table th { background-color: #f2f2f2; }
        .question-section { border: 1px solid #ddd; padding: 15px; margin-bottom: 15px; border-radius: 5px; }
        .question-title { font-weight: bold; color: #2c3e50; }
        .score { font-weight: bold; color: #e74c3c; }
        .footer { margin-top: 30px; text-align: center; color: #7f8c8d; }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>面试报告</h1>
            <p>{{ interview_date }}</p>
        </div>
        <div class="section">
            <h2>候选人信息</h2>
            <table class="table">
                <tr><th>姓名</th><td>{{ candidate_name }}</td></tr>
                <tr><th>应聘职位</th><td>{{ position }}</td></tr>
                <tr><th>面试官</th><td>{{ interviewer }}</td></tr>
            </table>
        </div>
        <div class="section">
            <h2>面试评估</h2>
            <table class="table">
                <tr><th>技术能力</th><td>{{ evaluation_result.technical_score }}/100</td></tr>
                <tr><th>沟通能力</th><td>{{ evaluation_result.communication_score }}/100</td></tr>
                <tr><th>综合评分</th><td>{{ evaluation_result.overall_score }}/100</td></tr>
            </table>
        </div>
        <div class="section">
            <h2>面试官评语</h2>
            <p>{{ evaluation_result.comments }}</p>
        </div>
        <div class="section">
            <h2>推荐意见</h2>
            <p>{{ evaluation_result.recommendation }}</p>
        </div>
        
        <div class="section">
            <h2>问题评估详情</h2>
            {% for question in evaluation_result.question_evaluations %}
            <div class="question-section">
                <p class="question-title">问题{{ question.id }}: {{ question.question }}</p>
                <p><strong>评分标准:</strong> {{ question.score_standard }}</p>
                <p><strong>候选人回答:</strong> {{ question.answer }}</p>
                <p><strong>评分:</strong> <span class="score">{{ question.score }}/10</span></p>
                <p><strong>点评:</strong> {{ question.comments }}</p>
            </div>
            {% endfor %}
        </div>
        
        <div class="footer">
            <p>Generated by xAI Interview System</p>
        </div>
    </div>
</body>
</html>